<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>登录界面</title>
    <!--<link rel="stylesheet" href="css/common.css">-->
    <link rel="stylesheet" href="../assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="../assets/font/css/open-iconic-bootstrap.css">
    <style>
        body {
            background: url("../wechat/image/background.jpg") no-repeat center center fixed;
            background-size: cover;
        }
        .title {
            text-align: center;
            padding-top: 88px;
            padding-bottom: 20px;
        }
        .login-face {
            width: 400px;
            height: 324px;
            padding: 10px;
            margin: 0 auto;
        }
        .checkRole {
            padding: 2px;
        }
        .txt-login {
            text-align: center;
            padding-bottom: 30px;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="title">
        <h2>水院计算机系微信公众号后台v1.0</h2>
    </div>
    <form action="/userLogin" method="post" onsubmit="return check()">
    <div class="login-face">
        <div class="shadow-lg p-3 mb-5 bg-white rounded">
            <div class="txt-login">
                <h3>用户登录</h3>
            </div>
            <div class="input-group mb-3">
                <div class="input-group-prepend">
                    <div class="input-group-text" id="btnGroupAddon1">
                        <span class="oi oi-person"></span>
                    </div>
                </div>
                <input type="text" class="form-control" placeholder="工号/学号" aria-label="工号/学号" aria-describedby="btnGroupAddon" name="username">
            </div>

            <div class="input-group mb-3">
                <div class="input-group-prepend">
                    <div class="input-group-text" id="btnGroupAddon2">
                        <span class="oi oi-key"></span>
                    </div>
                </div>
                <input type="password" class="form-control" id="inputPassword" placeholder="密码" name="password">
            </div>

            <#--
            <div class="checkRole">
                <div class="form-check form-check-inline mb-3">
                    <input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1" checked="checked">
                    <label class="form-check-label" for="inlineRadio1">教师</label>
                </div>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio2" value="option2">
                    <label class="form-check-label" for="inlineRadio2">学生</label>
                </div>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio3" value="option3">
                    <label class="form-check-label" for="inlineRadio3">管理员</label>
                </div>

            </div>
            -->
            <font color="red">
                <span id="message">${msg!""}</span>
            </font>
            <button type="submit" class="btn btn-primary btn-lg btn-block">登录</button>
        </div>
    </div>
    </form>
</div>
<script>
    function check() {
        var username = $("#username").val();
        var password = $("#password").val();
        if (username == "" || password == "") {
            $("#message").text("账号或密码不能为空!");
            return false;
        }
        return true;
    }
</script>
<script src="../assets/js/lib/jquery-2.1.3.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>

